package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.entity.Products;
import com.example.springboot.mapper.po.ProductSalesPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper //@Mapper注解将mapper标注为spring的一个组件
//使用mapper将数据传入数据库
public interface ProductsMapper {

//用户列表
    List<Products> list();

    List<Products> listByCondition(BaseRequest baseRequest);

    void save(Products products);

    Products getById(Integer id);

    void updateById(Products products);

    void deleteById(Integer id);

     Products getByProductsName(String productsName);


//
//    Products getByProductsNameAndPassword(@Param("productsName") String productsName, @Param("password") String password);

}
